package com.yc.txx.mapper;

import com.yc.txx.entity.Image;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 天下行租车-车辆轮播图-16 Mapper 接口
 * </p>
 *
 * @author xl
 * @since 2024-05-07
 */
public interface ImageMapper extends BaseMapper<Image> {
    
    @Select("select * from txx_image where cid=#{cid}")
    public List<Image> getDetailImg(String cid);


    @Insert("<script>" +
            "insert into txx_image(cid,path) values" +
            "<foreach collection='images' separator=',' item='item'>(#{cid},#{item})</foreach>" +
            "</script>")
    void addImage(@Param("cid") Integer cid,@Param("images") List<String> images);

}
